package com.tensquare.base.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: Feng.Wang
 * @Company: Zelin.ShenZhen
 * @Description:
 * @Date: Create in 2019/3/30 16:44
 */
@RestController
@RequestMapping("/test")
@RefreshScope    //当修改了远程配置文件中的自定义配置的话，需要使用此注解才通过自动刷新
public class TestController {
    @Value("${sms.ip}")
    public String ip;
    @RequestMapping(value =  "/ip")
    public String getIp(){
        return ip;
    }
}
